from django.db import models


class Article(models.Model):
    id = models.BigAutoField(primary_key=True, help_text='主键ID')
    # removed = models.BooleanField(null=True, help_text='标记删除')
    title = models.CharField(max_length=255, help_text='文章标题')
    removed = models.NullBooleanField(help_text='标记删除')
    create_time = models.DateTimeField(auto_now_add=True, help_text='创建时间')
    update_time = models.DateTimeField(auto_now=True, help_text='更新时间')

    def __str__(self):
        return f'<Article:({self.id}, {self.title})>'

    __repr__ = __str__
